
package cn.nubia.admin.sysconfig.bean;

import cn.nubia.admin.common.mybatis.annotations.Column;
import cn.nubia.admin.common.mybatis.annotations.Id;
import cn.nubia.admin.common.mybatis.annotations.Table;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * Created by justin on 15/6/30.
 * CREATE TABLE `nb_dict_field_item` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
 `field_id` int(11) DEFAULT NULL COMMENT '归属字段id',
 `item_key` varchar(30) DEFAULT NULL COMMENT '键名',
 `item_value` varchar(100) DEFAULT NULL COMMENT '字符串值',
 `item_title` varchar(50) DEFAULT NULL COMMENT '标题',
 `sort_index` int(11) DEFAULT NULL COMMENT '排序号',
 `create_admin_id` int(11) DEFAULT NULL COMMENT '创建人的管理员id',
 `create_admin_name` varchar(20) DEFAULT NULL COMMENT '创建人的管理员名称',
 `modify_admin_id` int(11) DEFAULT NULL COMMENT '修改人的管理员id',
 `modify_admin_name` varchar(20) DEFAULT NULL COMMENT '修改人的管理员名称',
 `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
 `last_modify_time` int(11) DEFAULT NULL COMMENT '最后修改时间',
 PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='字典表字段值';
 */
@Table(value = "nb_dict_field_item")
public class DictFieldItem implements Serializable {


    private static final long serialVersionUID = -8244661101951482489L;

    public static final String COLUMN_FIELD_ID = "fieldId";
    public static final String COLUMN_FIELD_Name = "fieldId";
    public static final String COLUMN_SORTINDEX = "sortIndex";
    public static final String COLUMN_ID = "id";
    public static final String COLUMN_ITEMKEY = "itemKey";
    public static final String COLUMN_ITEMVALUE = "itemValue";

    @Id(value = "id")
    private Integer id;
    @NotNull(message = "所属字段id不能为空")
    @Column(value = "field_id")
    private Integer fieldId;
    @Column(value = "item_key")
    @Size(max=30,message = "键名不能超过30字")
    @NotBlank(message = "键名不能为空")
    private String itemKey;//键名
    @Column(value = "item_value")
    @NotBlank(message = "键值不能为空")
    @Size(max=100,message = "键值不能超过100字")
    private String itemValue;//字符串值
    @Column(value = "item_title")
    @Size(max=50,message = "标题不能超过50字")
    private String itemTitle;//标题
    @Column(value = "sort_index")
    private Integer sortIndex;
    @Column(value = "create_admin_id")
    private Integer createAdminId;//创建管理员id
    @Column(value = "create_admin_name")
    private String createAdminName;//创建人的管理员名称
    @Column(value = "modify_admin_id")
    private Integer modifyAdminId;//修改人的管理员id
    @Column(value = "modify_admin_name")
    private String modifyAdminName;//修改人的管理员名称
    @Column(value = "create_time")
    private Integer createTime;//创建时间
    @Column(value = "last_modify_time")
    private Integer lastModifyTime;//最后修改时间

    public Integer getId() {
     return id;
    }

    public void setId(Integer id) {
     this.id = id;
    }

    public Integer getFieldId() {
     return fieldId;
    }

    public void setFieldId(Integer fieldId) {
     this.fieldId = fieldId;
    }

    public String getItemKey() {
     return itemKey;
    }

    public void setItemKey(String itemKey) {
     this.itemKey = itemKey;
    }

    public String getItemValue() {
     return itemValue;
    }

    public void setItemValue(String itemValue) {
     this.itemValue = itemValue;
    }

    public String getItemTitle() {
     return itemTitle;
    }

    public void setItemTitle(String itemTitle) {
     this.itemTitle = itemTitle;
    }

    public Integer getSortIndex() {
     return sortIndex;
    }

    public void setSortIndex(Integer sortIndex) {
     this.sortIndex = sortIndex;
    }

    public Integer getCreateAdminId() {
     return createAdminId;
    }

    public void setCreateAdminId(Integer createAdminId) {
     this.createAdminId = createAdminId;
    }

    public String getCreateAdminName() {
     return createAdminName;
    }

    public void setCreateAdminName(String createAdminName) {
     this.createAdminName = createAdminName;
    }

    public Integer getModifyAdminId() {
     return modifyAdminId;
    }

    public void setModifyAdminId(Integer modifyAdminId) {
     this.modifyAdminId = modifyAdminId;
    }

    public String getModifyAdminName() {
     return modifyAdminName;
    }

    public void setModifyAdminName(String modifyAdminName) {
     this.modifyAdminName = modifyAdminName;
    }

    public Integer getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Integer createTime) {
        this.createTime = createTime;
    }

    public Integer getLastModifyTime() {
        return lastModifyTime;
    }

    public void setLastModifyTime(Integer lastModifyTime) {
        this.lastModifyTime = lastModifyTime;
    }
}
